<?php
class User extends CActiveRecord
{
	public static function model($className=__CLASS__)
	{
		return parent::model($className);
	}
	
	public function tableName()
	{
		return 'user';
	}
	public function rules()
	{
		return array(
				array('username','required'),
				array('userpassword','required'),
				);
		
	}
	public function relations()
	{
		return array(
				'buyshop'=>array(self::HAS_MANY,'buyshop','userid'));
	}

	
}